﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FatHibernation.Utilities
{


    /// <summary>
    /// TimeWarper.Now is used throughout the project instead of DateTime.Now 
    /// in order to enable the unit-testing of timestamps.
    /// </summary>
    public class TimeWarper
    {

        private static DateTime? _now;

        public static DateTime Now
        {
            get
            {
                if (_now.HasValue)
                    return _now.Value;
                return DateTime.Now;
            }
            set
            {
                _now = value;
            }
        }

    }
}
